<template>
  <div class="addhouse">
    <hunk-head name="托管合同"></hunk-head>
    <div class="addhouseList">
      <uni-forms ref="form" :modelValue="formData" :rules="rules">
        <uni-forms-item label="房屋地址" name="roomno"  :label-width="120">
          <uni-easyinput type="text" :inputBorder="false" v-model="formData.roomno" placeholder="请输入管理费率" />
        </uni-forms-item>
        <div style="height:10px;background:#F9F9F9;"></div>
        <uni-forms-item label="租赁方式" name="roomno"  :label-width="120">
          <uni-easyinput type="text" :inputBorder="false" v-model="formData.roomno" placeholder="请输入管理费率" />
        </uni-forms-item>
        <uni-forms-item label="租客姓名" name="roomno"  :label-width="120">
          <uni-easyinput type="text" :inputBorder="false" v-model="formData.roomno" placeholder="请输入管理费率" />
        </uni-forms-item>
        <uni-forms-item label="租客身份证号码" name="roomno"  :label-width="120">
          <uni-easyinput type="text" :inputBorder="false" v-model="formData.roomno" placeholder="请输入管理费率" />
        </uni-forms-item>
        <uni-forms-item label="月租金" name="roomno"  :label-width="120">
          <uni-easyinput type="text" :inputBorder="false" v-model="formData.roomno" placeholder="请输入管理费率" />
        </uni-forms-item>
        <uni-forms-item label="租约开始时间" name="roomno"  :label-width="120">
          <uni-easyinput type="text" :inputBorder="false" v-model="formData.roomno" placeholder="请输入管理费率" />
        </uni-forms-item>
        <uni-forms-item label="租约结束时间" name="roomno"  :label-width="120">
          <uni-easyinput type="text" :inputBorder="false" v-model="formData.roomno" placeholder="请输入管理费率" />
        </uni-forms-item>
        <uni-forms-item label="交租方式" name="roomno"  :label-width="120">
          <uni-easyinput type="text" :inputBorder="false" v-model="formData.roomno" placeholder="请输入管理费率" />
        </uni-forms-item>
        <uni-forms-item label="日付租金" name="roomno"  :label-width="120">
          <uni-easyinput type="text" :inputBorder="false" v-model="formData.roomno" placeholder="请输入管理费率" />
        </uni-forms-item>
        <uni-forms-item label="周付租金" name="roomno"  :label-width="120">
          <uni-easyinput type="text" :inputBorder="false" v-model="formData.roomno" placeholder="请输入管理费率" />
        </uni-forms-item>
        <uni-forms-item label="月付租金" name="roomno"  :label-width="120">
          <uni-easyinput type="text" :inputBorder="false" v-model="formData.roomno" placeholder="请输入管理费率" />
        </uni-forms-item>
        <uni-forms-item label="季付租金" name="roomno"  :label-width="120">
          <uni-easyinput type="text" :inputBorder="false" v-model="formData.roomno" placeholder="请输入管理费率" />
        </uni-forms-item>
        <uni-forms-item label="管理费率" name="roomno"  :label-width="120">
          <uni-easyinput type="text" :inputBorder="false" v-model="formData.roomno" placeholder="请输入管理费率" />
        </uni-forms-item>
        <uni-forms-item label="首次交租采集费率" name="roomno"  :label-width="120">
          <uni-easyinput type="text" :inputBorder="false" v-model="formData.roomno" placeholder="请输入管理费率" />
        </uni-forms-item>
        <uni-forms-item label="首次交租时长" name="roomno"  :label-width="120">
          <uni-easyinput type="text" :inputBorder="false" v-model="formData.roomno" placeholder="请输入管理费率" />
        </uni-forms-item>
        <uni-forms-item label="电费" name="roomno"  :label-width="120">
          <uni-easyinput type="text" :inputBorder="false" v-model="formData.roomno" placeholder="请输入管理费率" />
        </uni-forms-item>
        <uni-forms-item label="提前交租时间" name="roomno"  :label-width="120">
          <uni-easyinput type="text" :inputBorder="false" v-model="formData.roomno" placeholder="请输入管理费率" />
        </uni-forms-item>
      
        <uni-forms-item  label="已签订的电子合同" name="showlowrent"  :label-width="140">
            <div class="flex flex2">
                <span>NJ-202204090</span> 
                <img class="icon del2" v-if="baseUrl" :src="baseUrl+'imgs/imgs/right.png'" alt="" srcset="">
            </div>
        </uni-forms-item>
        <div class="btn">
            <button class="subBtn" @click="submit">确认</button>
        </div>
      </uni-forms>
    </div>
  </div>
</template>

<script>
import Head from '@componentsMine/head'

export default {
  components: {
    'hunk-head': Head
  },
  data() {
    return {
      // leaseMode: [{"value": 0,"text": "短租"    },{"value": 1,"text": "长租"}],
      payMode: [{"value": 1,"text": "是"},{"value": 0,"text": "否"    }],
      payMode2: [{"value": 1,"text": "长期"},{"value": 0,"text": "固定期限"    }],
      formData: {
        leasetype: 1,  //租约方式，
        roomno: '',   //房间号
        payrent: 1, //是否允许线下交租
        lowrent: 0,  //最低月租金
      },
      rules: {
        roomno: {
          rules: [
            { required: true, errorMessage: '请输入房间号' }
          ]
        },
        showlowrent: {
          rules: [
            { required: true, errorMessage: '请输入展示月租租金' }
          ]
        }
      },
    }
  },
  created(){
  },
  onLoad(e){
  },
  computed: {
    userid(){
      return this.$store.state.baseStore.userInfo.userid
    },
    baseUrl() {
      return process.env.VUE_APP_BASE_IMG_URL;
    }
  },
  methods: {
    submit(){
     
      this.$refs.form.validate().then(res=>{
      }).catch(err =>{
        console.log('表单错误信息：', err);
      })
    },
 
  }
}
</script>

<style lang="scss" scoped>
.addhouse ::v-deep .uni-forms-item{
    border-bottom: 1px solid #EFEFEF!important;
}
 .del2{
    margin-left: 8px;
    position: relative;
    top: 3px;
}
.icon{
    width: 9px;
    height: 15px;
}
.placeholder{
    color: #9B9B9B;
}
.flex2{
  span{
        color: #0191FF;
    }
}
.flex{
    line-height: 45px;
  
}
.addhouse {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  .addhouseList{
    flex: 1;
    background: #F9F9F9;
    overflow-y: auto;
  }
  
}
::v-deep .uni-forms{
  background: #FFFFFF;
  .uni-forms-item{
    // height: 45px;
    margin: 0 15px;
    background: #FFFFFF;
    border-bottom: 1px solid #EFEFEF;
    .uni-forms-item__box{
      .uni-error-message{
        right: 0;
        left: auto;
        .uni-error-message-text{
          line-height: 10px;
          font-size: 10px;
        }
      }
      .uni-forms-item__inner{
        margin: 0;
        padding: 0;
      }
    }
    
    .uni-forms-item__label{
      padding: 0;
      height: 45px;
      .label-text{
        font-size: 15px;
        font-family: PingFangSC-Medium, PingFang SC;
        font-weight: 500;
        color: #000000;
        line-height: 21px;
        margin-left: 4px;
      }
    }
    .uni-forms-item__content{
      height: 45px;
      text-align: right;
      .uni-data-checklist{
        margin-bottom: 6px;
        height: 33px;
        .checklist-group{
          height: 100%;
          justify-content: flex-end;
          font-size: 14px;
          font-family: PingFangSC-Medium, PingFang SC;
          font-weight: 500;
          color: #4A4A4A;
          line-height: 35px;
          .checklist-box.is--tag.is-checked{
            background-color: rgb(245, 245, 245);
            color: #FFBD6C;
          }
          .checklist-box{
            position: static;
            margin: 0;
            margin-right: 20px;
          }
          .checklist-box:last-child{
            margin-right: 0;
          }
        }
      }
      .uni-easyinput{
        .uni-easyinput__content{
          .uni-easyinput__content-input{
            height: 45px;
            text-align: right;
            font-size: 14px;
            font-family: PingFangSC-Medium, PingFang SC;
            font-weight: 500;
            line-height: 45px;
            color: #4A4A4A;
            .uni-easyinput__placeholder-class{
              font-size: 14px;
              font-family: PingFangSC-Medium, PingFang SC;
              font-weight: 500;
              line-height: 45px;
              color: #9B9B9B;
              
            }
          }
        }
      }
      .uni-date{
        .uni-date-editor{
          div{
            font-size: 14px;
            font-family: PingFangSC-Medium, PingFang SC;
            font-weight: 500;
            color: #9B9B9B;
            line-height: 45px;
          }
        }
      }
      .address{
        font-size: 14px;
        font-family: PingFangSC-Medium, PingFang SC;
        font-weight: 500;
        color: #4A4A4A;
        line-height: 18px;
      }
    }
  }
  .uni-forms-item:last-child{
    border: 0;
  }
  .housAdd{
    display: flex;
    justify-content: space-between;
    padding: 12px 15px;
    .lable{
      width: 150px;
      height: 21px;
      font-size: 15px;
      font-family: PingFangSC-Medium, PingFang SC;
      font-weight: 500;
      color: #000000;
      line-height: 21px;
      .red{
          color: #FF5A65;
      }
    }
    .address{
      font-size: 14px;
      font-family: PingFangSC-Medium, PingFang SC;
      font-weight: 500;
      color: #4A4A4A;
      line-height: 20px;
    }
  }
  .item1{
    border: 0;
  }
  .cycleItme{
    height: auto;
    .is-direction-left{
      flex-direction: column;
      .uni-forms-item__label{
        height: auto;
        margin-top: 13px;
      }
      .uni-forms-item__content{
        height: auto;
        .checklist-group{
          display: flex;
          justify-content: space-between;
        }
      }
    }
  }
  .typelist{
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-direction: row;
    margin-top: 10px;
    margin-bottom: 10px;
    flex-wrap: wrap;
    .item-img{
      width: 59px;
      height: 30px;
      background: rgba($color: #898989, $alpha: 0.08);
      border: 1px solid #898989;
      border-radius: 20px;
      font-family: PingFangSC-Medium, PingFang SC;
      font-weight: 500;
      color: #4A4A4A;
      text-align: center;
      line-height: 30px;
    }
    .check-img{
      background: rgba($color: #FFAA58, $alpha: 0.08);
      border: 1px solid #FFAA58;
      color: #FFAA58;
    }
  }
  .roomFa{
    align-items: center;
    flex-direction: row;
    display: flex;
    justify-content: flex-start;
    flex-wrap: wrap;
    margin-top: 0;
    margin-bottom: 10px;
    .iiii{
      margin-right: 10px;
      margin-top: 10px;
      .item-img{
        padding: 6px 15px;
        box-sizing: border-box;
        font-size: 13px;
        font-family: PingFangSC-Medium, PingFang SC;
        font-weight: 500;
        color: #4A4A4A;
        line-height: 18px;
        background: rgba($color: #898989, $alpha: 0.08);
        border-radius: 15px;
        border: 1px solid #9B9B9B;
      }
      .check-img{
        background: rgba($color: #FFAA58, $alpha: 0.08);
        border: 1px solid #FFAA58;
        color: #FFAA58;
      }
    }
    .iiii:nth-child(5){
       margin-right: 0;
    }
  }
  .addImg{
    margin: 15px 0 15px 15px;
    .imgbtn{
      width: 80px;
      height: 80px;
    }
  }
}
.btn{
  display: flex;
  justify-content: center;
  align-items: center;
  padding-top: 20px;
  padding-bottom: 44px;
  .subBtn{
    width: 345px;
    height: 45px;
    background: linear-gradient(315deg, #FFAA58 0%, #FFBD6C 100%);
    box-shadow: 0px 2px 4px 0px rgba(252, 174, 55, 0.21), 0px 3px 5px 0px rgba(255, 216, 111, 0.14);
    border-radius: 100px;
    font-size: 16px;
    font-family: PingFangSC-Semibold, PingFang SC;
    font-weight: 600;
    color: #FFFFFF;
    line-height: 45px;
    text-shadow: 0px 2px 4px rgba(252, 174, 55, 0.21);
  }
  .subBtn::after{
    border: 0;
  }
  uni-button:after {
    border: 0;
  }
}
</style>
